﻿namespace Helpers.Common
{
    /// <summary>
    /// A simple class to be used as a verification result of a method which needs to indicate if it was sucess, valid or not and has a message too.
    /// </summary>
    public class ValidationResponse
    {
        #region Properties

        /// <summary>
        /// Explains the verificationResult.
        /// </summary>
        public string Message;
        /// <summary>
        /// Indicates if the transaction was succes, valid or not.
        /// </summary>
        public bool Valid;

        #endregion

        /// <summary>
        /// Initializes a new instance of the <typeparamref name="ValidationResponse"/> class.
        /// </summary>
        public ValidationResponse()
            : this(true, "")
        {
        }
        /// <summary>
        /// Initializes a new instance of the <typeparamref name="ValidationResponse"/> class.
        /// </summary>
        /// <param name="valid">Indicates if the transaction was succes, valid or not.</param>
        public ValidationResponse(bool valid)
            : this(valid, "")
        {
        }
        /// <summary>
        /// Initializes a new instance of the <typeparamref name="ValidationResponse"/> class.
        /// </summary>
        /// <param name="message">Explains the verificationResult.</param>
        public ValidationResponse(string message)
            : this(false, message)
        {
        }
        /// <summary>
        /// Initializes a new instance of the <typeparamref name="ValidationResponse"/> class.
        /// </summary>
        /// <param name="valid">Indicates if the transaction was succes, valid or not.</param>
        /// <param name="message">Explains the verificationResult.</param>
        public ValidationResponse(bool valid, string message)
        {
            this.Message = message;
            this.Valid = valid;
        }
    }
}
